package cn.mulanbay.api.system.service;

import cn.mulanbay.api.system.bean.RemoteRoleUrlAuthRequest;
import cn.mulanbay.api.system.config.FeignRequestInterceptor;
import cn.mulanbay.api.system.factory.RemoteRoleFallbackFactory;
import cn.mulanbay.common.config.ServiceNameConstants;
import cn.mulanbay.common.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 角色服务
 *
 * @author fenghong
 */
@FeignClient(contextId = "remoteRoleService",
        value = ServiceNameConstants.ADMIN_API_SERVICE,
        fallbackFactory = RemoteRoleFallbackFactory.class,
        configuration={FeignRequestInterceptor.class})
public interface RemoteRoleService {

    /**
     * URL是否授权
     * @param uar
     * @return
     */
    @PostMapping("/role/isUrlAuth")
    public R<Integer> isUrlAuth(@RequestBody RemoteRoleUrlAuthRequest uar);

}
